package com.easou.ps.dk.services;

import java.util.List;
import java.util.Map;

import com.easou.ps.dk.domain.ABaiduResult;
import com.easou.ps.dk.domain.QueryParams;

public class WatchBaiduInfo {

	public static void todo(QueryParams qp) {
		List<ABaiduResult> results = qp.getBaiduResult().getResults();
		for (int i = 0; i < results.size(); i++) {
			String query = results.get(i).getQuery();
//			System.out.println("------"+query+"------");
			Map<String, String> urls = results.get(i).getUrls();
			List<String> simpleUrls = results.get(i).getSimpleUrls();
			for (int j = 0; j < simpleUrls.size(); j++) {
				String easouInfo = urls.get(simpleUrls.get(j));
				System.out.println(query+"\t"+simpleUrls.get(j)+"\t"+easouInfo.split("_")[0]+"\t"+easouInfo.split("_")[1]);
			}
		}
		System.out.println("catched : "+qp.getCatchBaiduCount());
	}

	
}
